#include "document.h"
#include "ui_document.h"

document::document(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::document)
{
    ui->setupUi(this);
    setAttribute(Qt::WA_QuitOnClose,false);
    this->setWindowTitle("软件说明");
}

void document::display_soft_doc(){
//    file = new QFile("document.txt");
//    if(file->open(QIODevice::ReadWrite) == false){
//        qDebug() << "ERROR";
//    }
//    QTextStream stream(file);
//    QString text;
//    text = stream.readAll();
//    qDebug() << text;
//    ui->textBrowser->setText(text);
//    ui->textBrowser->setAcceptRichText(true);
    ui->textEdit->setReadOnly(true);
    this->show();
}

document::~document()
{
    delete ui;
}
